Image enhancement method and system

ABSTRACT

The present application provides an image enhancement method and system, the method includes acquiring an input brightness value, and computing a log average value of the input brightness value; processing the input image based on a Retinex image enhancement algorithm to obtain a first brightness gain value; computing a brightness gain control factor according to the log average value of the input brightness value; computing a second brightness gain value according to the brightness gain control factor and the first brightness gain value; and obtaining an output image by enhancing the input image according to the second brightness gain value. The present application uses a Retinex image enhancement algorithm to enhance the input image, and by using the brightness gain control factor, when the image has low brightness, the first brightness gain value is compressed, and when the image has high brightness, the first brightness gain value is compressed slightly.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2018/110702, filed on Oct. 17, 2018, which is based upon andclaims priority to Chinese Patent Application No. 201711116454.5, filedon Nov. 13, 2017, the entire contents of which are incorporated hereinby reference.

TECHNICAL FIELD

The present application relates to the field of digital image processingtechnology, and particularly relates to an image enhancement method andsystem based on a Retinex image enhancement algorithm.

BACKGROUND

A video capture process is affected by many factors, such asinsufficient lighting and low brightness at night or in low-lightshooting conditions; light blocking makes part of the formed imagebrighter and the other part darker, causing uneven lighting; reflectionor strong light sources render the acquired image brightnessdistribution uneven, and highlight areas with blurred details.Insufficient or uneven lighting will cause poor display effect of theimage, thus does not satisfy people's visual perception. On the otherhand, for subsequent image processing such as image recognition andtarget tracking, it will impose a serious impact, thus, imageenhancement technology is needed to enhance images subjected to unevenlighting to improve the quality.

The image enhancement technology refers to using signal processingtechniques to enhance local or overall features according to the imagequality and different applications. For image s with uneven lighting,the commonly used image enhancement algorithms are: grey transformmethod, homomorphic filtering method, wavelet transform enhancement, animage enhancement algorithm based on Retinex theory etc., among whichthe Retinex image enhancement algorithm has the advantages of colorfidelity, detail enhancement and dynamic range compression, and is oftenused in combination with other algorithms to achieve better enhancementeffects. Multi-scale Retinex (MSR, Multi-Scale Retinex) and MSR withcolor restoration (MSRCR, Multi-Scales Retinex with Color Restoration)are two methods widely used. However, the two algorithms have pooreffect for image processing with multiple light sources, and are proneto generate halo artifacts. For darker images, the output image is overbright and does not match to real scene although it looks clearer.Particularly, when an image has poor quality, the output image isaccompanied by noise and may generate blocking effects, thereby causingworse effect.

SUMMARY

With respect to the problems in the prior art, the objective of thepresent application is to provide an image enhancement method and systemto control the output brightness, so that the output image can be bothimproved and consistent with the real environment.

An image enhancement method provided by embodiments of the presentapplication comprises the following steps:

acquiring an input brightness value of each pixel of an input image, andcomputing a log average value of the input brightness values;

processing the input image based on a Retinex image enhancementalgorithm, to obtain a first brightness gain value of each pixel;

computing a brightness gain control factor, which is positivelycorrelated with the log average value of the input brightness values,according to the log average value of the input brightness values;

computing a second brightness gain value of each pixel according to thebrightness gain control factor and the first brightness gain value; and;

obtaining an output image by enhancing each pixel of the input imageaccording to the second brightness gain value.

The present application embodiment further provides an image enhancementsystem, for realizing the image enhancement method, the systemcomprises:

an input brightness value acquisition module, for acquiring the inputbrightness value of each pixel of an input image;

a brightness gain value computation module, for computing a log averagevalue of the input brightness values; and processing the input imagebased on a Retinex image enhancement algorithm, to obtain the firstbrightness gain value of each pixel;

a brightness control module, for computing a brightness gain controlfactor, which is positively correlated with the log average value of theinput brightness values, according to the log average value of the inputbrightness values; and computing the second brightness gain value ofeach pixel according to the brightness gain control factor and the firstbrightness gain value; and

an image enhancement module, for obtaining an output image by enhancingeach pixel of the input image according to the second brightness gainvalue.

The image enhancement method provided by the present application has thefollowing advantages:

The present application uses a Retinex image enhancement algorithm toenhance the input image, and by using the brightness gain controlfactor, when the image has low brightness, the first brightness gainvalue will be greatly compressed, and when the image has highbrightness, the first brightness gain value is compressed slightly, sothat the brightness gain of the dark image can be reduced, thus thebrightness of the output image can be effectively controlled, and thebrightness of the output image can be improved and consistent with thereal environment.

BRIEF DESCRIPTION OF THE DRAWINGS

By reading the detailed description of the non-limiting embodiment withreference to the following drawings, other features, purpose andadvantages of the present application will become more apparent.

FIG. 1 is a flowchart of an image enhancement method of the presentapplication;

FIG. 2 is a flowchart for computing a first brightness gain value in anembodiment of the present application;

FIG. 3 is a flowchart of an image enhancement method in an embodiment ofthe present application;

FIG. 4 is a structural diagram for an image enhancement system in anembodiment of the present application;

FIG. 5 is a structural diagram for a brightness gain computation modulein an embodiment of the present application.

DETAILED DESCRIPTION

Exemplary implementations will now be described more fully withreference to the accompanying drawings. However, the exemplaryimplementations can be implemented in a variety of forms and should notbe understood to be limited to the implementations set forth herein;instead, providing these implementations makes the present applicationcomprehensive and complete, and fully convey the concept of theexemplary implementation to those skilled in the art. In the figures,the same reference numerals indicate the same or similar structures, sorepeated descriptions thereof will be omitted.

As shown in FIG. 1, the present application provides an imageenhancement method, comprising the following steps:

S100: acquiring an input brightness value of each pixel of an inputimage, and computing a log average value of the input brightness values;

S200: processing the input image based on a Retinex image enhancementalgorithm, to obtain a first brightness gain value of each pixel;

S300: computing a brightness gain control factor according to the logaverage value of the input brightness values, the brightness gaincontrol factor is positively correlated with the log average value ofthe input brightness values;

S400: computing a second brightness gain value of each pixel accordingto the brightness gain control factor and the first brightness gainvalue; and

S500: obtaining an enhanced image by enhancing each pixel of the inputimage according to the second brightness gain value.

The present application adopts a Retinex image enhancement algorithm toenhance the input image, and a brightness gain control factor to controlthe brightness gain. The brightness gain control factor, which dependson a log average value of the input brightness value, can well reflectthe overall brightness level of the input image, on the basis of whichthe brightness gain is controlled accordingly, so that the brightness ofthe output image can be improved and consistent with the realenvironment.

In the present application, the Retinex image enhancement algorithm canuse a global adaptive algorithm, or a local adaptive algorithm, or acombination of the global adaptive algorithm and the local adaptivealgorithm. In addition, other image enhancement algorithms based onRetinex can also be used, and all these algorithms fall into the scopeof the present application.

The present application will be described in detail with a specificembodiment as follows. The embodiment is based on the Retinex theory.First, the global tone mapping technology is used to pre-process theinput image; then, the local tone mapping is used to process the outputafter the global processing; then, the output brightness of the Retinexalgorithm is normalized; the brightness gain control factor is used toprocess the output brightness of the Retinex algorithm; finally, theoutput image is obtained from the processed brightness and inputchrominance values.

As shown in FIG. 2, in the embodiment, image enhancement includes twoparts: global processing and local processing. Specifically, the abovestep S200 may include the following steps:

S201: processing the input image based on a global adaptive algorithm toobtain a global output brightness value of each pixel;

S202: processing the global output brightness based on a local adaptivealgorithm to obtain an output brightness value of each pixel; and

S203: computing the first brightness gain value of each pixel accordingto the output brightness value and the input brightness value.

In addition, in this embodiment, the local adaptive algorithm in stepS202 is improved, and the Gaussian filter in the visual algorithm isreplaced with a guided filter, which can remove the halo. A contrastenhancement factor based on scene brightness, which is for controllingthe contrast of the output image, is added to the local processingalgorithm. In addition, the embodiment also introduces the non-linearintensity of the logarithmic function to process the adaptive non-linearoffset.

As shown in FIG. 3, the image enhancement method of the embodiment mayinclude the following steps:

S1: inputting image data, and computing an input brightness value L_(w)and a log average value L _(w) thereof;

S2: taking the input brightness value L_(w) to a logarithmic function ofbrightness perceived by the human visual system, to obtain a globaloutput brightness value L_(g);

S3: performing guided filtering of the global output brightness valueL_(g), to obtain an output H_(g) of the guided filter, determining acontrast control parameters η and a non-linear control parameters λ, andcomputing a local brightness output L_(l);

S4: determining a brightness gain control factor τ, and computing thebrightness gain value of each pixel with the input brightness valueL_(w), the log average value L _(w), the local brightness output L_(l)and brightness gain control factor τ; and

S5: multiplying the pixel values of three channels of the input image bythe brightness gain value respectively, to construct a new image.

Therefore, using the image enhancement method of the embodiment can notonly enhance the contrast and brightness of the output image, but alsoeliminate halo artifacts. The present application can perform adaptiveenhancement for different types of images, ensuring real-time imageenhancement.

Each of the steps will be described in detail as follows:

S1. input image data, computing the input brightness value L_(w) of theinput image, and computing the log average value L _(w) according to thefollowing formula:

${\overset{\_}{L}}_{w} = {\exp\mspace{11mu}\left( {\frac{1}{N}\Sigma_{x,y}\mspace{11mu}\log\mspace{11mu}\left( {\delta + {L_{w}\left( {x,y} \right)}} \right)} \right)}$

wherein, L_(w)(x,y) is the input brightness value of the pixel (x,y), L_(w) is the log average value of L_(w)(x,y), N is the total number ofpixels of the input image, δ is a second preset control value, andL_(w)(x,y) is the input brightness value of the pixel (x,y).

S2. Computing the global output brightness value L_(g)(x,y) according tothe global adaptive algorithm.

Global self-adaptation is similar to the early human vision system. Theapproximation of the brightness perceived by the human vision system isa logarithmic function. Therefore, the conversion formula for the visualglobal brightness is as follows:

${L_{g}\left( {x,y} \right)} = \frac{\log\left( {{{L_{w}\left( {x,y} \right)}/{\overset{¯}{L}}_{w}} + 1} \right)}{\log\left( {{L_{w\max}/{\overset{¯}{L}}_{w}} + 1} \right)}$

wherein, L_(g)(x,y) is the global output brightness value of the pixel(x,y), L_(w)(x,y) is the input brightness value of the pixel (x,y),L_(wmax) is the maximum value of L_(w)(x,y), and L _(w) is the logaverage value of L_(w)(x,y).

S3. Computing the local output brightness value L_(l)(x,y) according tothe local adaptive algorithm.

After the global adaptive processing, a local adaptive algorithm basedon the visual theory is used. In this embodiment, a guided filter isused instead of the double-edge filter in the traditional theory, bothof which are edge-preserving filters, and the guided filter has betterperformance near the edge. The local adaptive formula is:L _(w)(x,y)=log(L _(g)(x,y))−log(H _(g)(x,y))

wherein, L_(g)(x,y) is the global output brightness value of the pixel(x,y), H_(g)(x,y) is the output of the guided filter, and L_(l)(x,y) isthe local output brightness value of the pixel (x,y).

Computing the output of the guided filter according to the followingformula:

${H_{g}\left( {x,y} \right)} = {\frac{1}{\omega }{\Sigma_{{({\xi_{x},\xi_{y}})}{{\epsilon\omega}{({x,y})}}}\left( {{{a\left( {\xi_{x},\xi_{y}} \right)}{L_{g}\left( {x,y} \right)}} + {b\left( {\xi_{x},\xi_{y}} \right)}} \right)}}$

wherein, ξ_(x),ξ_(y) are adjacent coordinates of the pixel (x,y), ω(x,y)is a local rectangular window at a distance of radius r from the pixel(x,y), |ω| is the number of pixels in the ω(x,y), a(ξ_(x),ξ_(y)) andb(ξ_(x),ξ_(y)) are respectively linear coefficients, which may berespectively computed according to the following two formulas:

${a\left( {\xi_{x},\xi_{y}} \right)} = \frac{{\mu_{2}\left( {\xi_{x},\xi_{y}} \right)} - {\mu^{2}\left( {\xi_{x},\xi_{y}} \right)}}{{\sigma^{2}\left( {\xi_{x},\xi_{y}} \right)} + ɛ}$b(ξ_(x), ξ_(y)) = μ(ξ_(x), ξ_(y)) − a(ξ_(x), ξ_(y))μ(ξ_(x), ξ_(y))

wherein, μ(ξ_(x),ξ_(y)) and σ²(ξ_(x),ξ_(y)) are respectively a mean anda variance of L_(g)(x,y) in ω(ξ_(x),ξ_(y)), μ₂(ξ_(x),ξ_(y)) is a mean ofL_(g) ²(x,y) in ω(ξ_(x),ξ_(y)), and ε is a regularization parameter.

After filtering, the halo effect will be significantly reduced, but theglobal contrast is low. Two important factors are introduced to preventthe flat effect caused by the filter and improve the performance of thealgorithm. One factor is a contrast enhancement factor with a formulashown as:

${\alpha\left( {x,y} \right)} = {1 + {\eta\frac{L_{g}\left( {x,y} \right)}{L_{g\max}}}}$

The other factor is an adaptive nonlinear offset factor with a formulashown as:β=λ L _(g)

wherein, L_(gmax) is the maximum value of L_(g)(x,y), λ is a non-linearcontrol parameter, and L _(g) is the log average value of L_(g)(x,y).

Through the computation of the above partial factors, the final localadaptive formula is:

${L_{out}\left( {x,y} \right)} = {{\alpha\left( {x,y} \right)}{\log\left( {\frac{L_{g}\left( {x,y} \right)}{H_{g}\left( {x,y} \right)} + \beta} \right)}}$

wherein, L_(out)(x,y) is an optimized local output brightness value ofthe pixel (x,y).

S4. Determining the brightness gain control factor τ.

Normalizing L_(out), so that it is in the same range as the inputbrightness. The normalization method can use the following formula:

${L_{out}^{\prime}\left( {x,y} \right)} = \frac{{L_{out}\left( {x,y} \right)} - L_{outmin}}{L_{outmax} - L_{outmin}}$

wherein, L′_(out)(x,y) is a normalized brightness value of L_(out)(x,y),and L_(outmax) and L_(outmin) are respectively maximum value and minimumvalue of L_(out)(x,y).

Computing the first brightness gain value according to the followingformula:

${G\left( {x,y} \right)} = \frac{L_{out}^{\prime}\left( {x,y} \right)}{L_{w}\left( {x,y} \right)}$

wherein, G(x,y) is a first brightness gain value of the pixel (x,y).

G(x,y), if directly used as the gain output image, cannot effectivelycontrol the output brightness of the image. For darker images, theoutput image brightness is too high, and the image is not consistentwith the actual scene although it looks clearer; especially when theimage has poor quality, the output image is accompanied by noise andlooks worse.

In order to solve the above problem, it is necessary to control theoutput brightness so that the output image can be improved andconsistent with the real environment. Then it is expected that as theimage brightness becomes smaller, the G(x,y) becomes smaller and thegradient becomes greater.

To this end, a brightness gain control factor τ is conceived, which isadjusted on the basis of G(x,y).G′(x,y)=(G(x,y))^(τ)

wherein, τ is the brightness gain control factor, G(x,y)

G′(x,y) are respectively the first brightness gain value and the secondbrightness gain value of a pixel (x,y).

Computing the brightness gain control factor according to the followingformula:τ=( L _(w))^(φ)

wherein, L _(w) is the log average value of the input brightness values,τ is the brightness gain control factor, φ is a first preset controlvalue, and φϵ[0,1]. In practical applications, the first preset controlvalue can be selected according to empiric values, for example, 0.5,0.6, etc., to acquire the best brightness gain control effect. Inaddition, when the value of φ is 0, the brightness gain control factoris 1, which has no effect on the first brightness gain value, so thevalue of φ is further preferably selected in the range of (0,1].

The brightness gain control factor τ takes the log average value of theinput brightness as input, which can better reflect the brightness ofthe original image. L _(w) is the log average value of the inputbrightness value, and L _(w)∈[0,1], thus τ∈[0,1].

This is because when the image brightness is low, the first brightnessgain value will be greatly compressed, and when the image brightness islarge, the first brightness gain value will be compressed to arelatively small extent, thereby controlling the output brightness, toachieve effective control.

S5: enhancing each pixel of the input image according to the followingformula, to obtain the output image:RGB1(x,y)=RGB0(x,y)*G′(x,y)

wherein, G′(x,y) is the second brightness gain value of the pixel (x,y),RGB1(x,y) is a RGB value of the pixel (x,y) in an output image, andRGB0(x,y) is a RGB value of the pixel (x,y) in an input image.

As shown in FIG. 4, an embodiment of the present application alsoprovides an image enhancement system for implementing theabove-mentioned image enhancement method. The system includes an inputbrightness value acquisition module 100, a brightness gain computationmodule 200, a brightness control module 300 and an image enhancementmodule 400, wherein:

The brightness acquisition module 100 acquires the input brightnessvalue of each pixel in the input image; the brightness gain computationmodule 200 computes the log average value of the input brightness value,and processes the input image based on a Retinex image enhancementalgorithm, to obtain first brightness gain value of each pixel; thebrightness control module 300 computes a brightness gain control factoraccording to the log average value of the input brightness values, andcomputing second brightness gain value of each pixel according to thebrightness gain control factor; and the image enhancement module 400obtains an output image by enhancing each pixel of the input imageaccording to the second brightness gain value.

In this embodiment, the input image is enhanced using the Retinex imageenhancement algorithm, and the brightness gain is controlled by usingthe brightness gain control factor. The brightness gain control factoris determined by the log average value of the input brightness value,which can well reflect the overall brightness level of the input image,and control the brightness gain according to the overall brightnesslevel of the input image, so that the brightness of the output image canbe both improved and consistent with the real environment.

Each module can implement fixed-point processing of the algorithm, andcan be implemented in FPGA (Field-Programmable Gate Array, FieldProgrammable Gate Array). The specific operation steps of each modulecan refer to the embodiment of the above mentioned image method. Asshown in FIG. 5, the brightness gain computation module 200 may furtherinclude a global adaptive unit 201 that uses a global adaptive algorithmto process the image to obtain a global output brightness value; afiltering unit 202 that uses a guided filter to filter the global outputbrightness value; a contrast control unit 203 that computes a contrastenhancement factor, and introduces the contrast enhancement factor intothe local adaptive formula; a non-linear offset unit 204 that computesan adaptive nonlinear offset factor, and introduces the adaptivenonlinear offset factor into the local adaptive formula. Therefore,using the image enhancement method of the embodiment can not onlyeffectively control the brightness of the output image, but also reducethe halo effect of the enhanced image through the guided filter, enhancethe global contrast of the image through the contrast enhancementfactor, and maintain the accuracy of the local adaptive algorithmthrough the adaptive nonlinear offset factor.

The image enhancement method and system provided by the presentapplication have the following advantages:

The present application uses the Retinex image enhancement algorithm toenhance the input image. With the use of the brightness gain controlfactor, when the image brightness is low, the first brightness gainvalue will be greatly compressed, and when the image brightness islarge, the first brightness gain value is compressed by a small amount,so that the brightness gain of the dark image can be reduced; thus, thebrightness of the output image can be effectively controlled, and thebrightness of the output image can be both improved and consistent withthe real environment.

The above contents are further detailed description of the presentapplication in combination with specific preferred implementations. Itcannot be considered that the specific implementation of the presentapplication is limited to these descriptions. For those with ordinaryskills in the technical field to which the present application belongs,a number of simple derivations or replacements can also be made withoutdeparting from the concept of the present application, and all of thederivations or replacements should be considered as belonging to theprotection scope of the present application.

What is claimed is:
 1. An image enhancement method, comprising thefollowing steps: acquiring an input brightness value of each pixel of aninput image, and computing a log average value of the input brightnessvalues; processing the input image based on a Retinex image enhancementalgorithm, to obtain a first brightness gain value of each pixel;computing a brightness gain control factor, which is positivelycorrelated with the log average value of the input brightness values,according to the log average value of the input brightness values;computing a second brightness gain value of each pixel according to thebrightness gain control factor and the first brightness gain value; andobtaining an output image by enhancing each pixel of the input imageaccording to the second brightness gain value.
 2. The image enhancementmethod of claim 1, wherein, computing the second brightness gain valueof each pixel according to the following formula:G′(x,y)=(G(x,y))^(τ) wherein, τ is the brightness gain control factor,G(x,y)

G′(x,y) are respectively the first brightness gain value and secondbrightness gain value of a pixel (x,y).
 3. The image enhancement methodof claim 2, wherein, computing the brightness gain control factoraccording to the following formula:τ=( L _(w))^(φ) wherein, L _(w) is the log average value of the inputbrightness values, τ is the brightness gain control factor, φ is a firstpreset control value, and φ∈[0,1].
 4. The image enhancement method ofclaim 1, wherein, computing the log average value of the inputbrightness values according to the following formula:${\overset{¯}{L}}_{w} = {\exp\left( {\frac{1}{N}{\sum\limits_{x,y}{\log\left( {\delta + {L_{w}\left( {x,y} \right)}} \right)}}} \right)}$wherein, L_(w)(x,y) is the input brightness value of the pixel (x,y), L_(w) is the log average value of L_(w)(x,y), N is the total number ofpixels of the input image, δ is a second preset control value, andL_(w)(x,y) is the input brightness value of the pixel (x,y).
 5. Theimage enhancement method of claim 1, wherein, processing the input imagebased on a Retinex image enhancement algorithm comprises the followingsteps: processing the input image based on a global adaptive algorithmto obtain a global output brightness value of each pixel; processing theglobal output brightness based on a local adaptive algorithm to obtainan output brightness value of each pixel; and computing the firstbrightness gain value of each pixel according to the output brightnessvalue and the input brightness value.
 6. The image enhancement method ofclaim 5, wherein, processing the input image based on a global adaptivealgorithm comprises the following steps: computing the global outputbrightness value of each pixel according to the following formula:${L_{g}\left( {x,y} \right)} = \frac{\log\left( {{{L_{w}\left( {x,y} \right)}/{\overset{¯}{L}}_{w}} + 1} \right)}{\log\left( {{L_{w\max}/{\overset{¯}{L}}_{w}} + 1} \right)}$wherein, L_(g)(x,y) is the global output brightness of the pixel (x,y),L_(w)(x,y) is the input brightness value of the pixel (x,y), L_(wmax) isa maximum value of L_(w)(x,y), and L _(w) is the log average value ofL_(w)(x,y).
 7. The image enhancement method of claim 5, wherein,processing the global output brightness based on a local adaptivealgorithm comprises the following steps: computing an output value of aguided filter according to the global output brightness of each pixel;computing a local output brightness value of each pixel according to thefollowing formula:L _(l)(x,y)=log(L _(g)(x,y))−log(H _(g)(x,y)) wherein, L_(g)(x,y) is theglobal output brightness value of the pixel (x,y), H_(g)(x,y) is theoutput value of the guided filter, and L_(l)(x,y) is the local outputbrightness value of the pixel (x,y); and taking the local outputbrightness value as the output brightness value of each pixel.
 8. Theimage enhancement method of claim 5, wherein, processing the globaloutput brightness value based on a local adaptive algorithm comprisesthe following steps: computing output value of the guided filteraccording to the global output brightness value of each pixel; computingthe local output brightness value of each pixel according to thefollowing formula:${L_{out}\left( {x,y} \right)} = {{\alpha\left( {x,y} \right)}{\log\left( {\frac{L_{g}\left( {x,y} \right)}{H_{g}\left( {x,y} \right)} + \beta} \right)}}$wherein, L_(g)(x,y) is the global output brightness value of the pixel(x,y), H_(g)(x,y) is the output value of the guided filter, L_(out)(x,y)is the local output brightness value of the pixel (x,y), α(x,y) is acontrast enhancement factor of the pixel (x,y), β is an adaptivenonlinear offset factor; and both α(x,y) and β may be respectivelycomputed by the following two formulas:${{\alpha\left( {x,y} \right)} = {1 + {\eta\frac{L_{g}\left( {x,y} \right)}{L_{g\max}}}}}{\beta = {\lambda{\overset{¯}{L}}_{g}}}$wherein, L_(gmax) is a maximum value of L_(g)(x,y), it is a contrastcontrol parameter, λ is a non-linear control parameter, and L _(g) isthe log average value of L_(g)(x,y); and taking the local outputbrightness value as the output brightness value of each pixel.
 9. Theimage enhancement method of claim 7, wherein, computing the output ofthe guided filter according to the following formula:${H_{g}\left( {x,y} \right)} = {\frac{1}{\omega }{\sum\limits_{{({\xi_{x},\xi_{y}})}{{\epsilon\omega}{({x,y})}}}\left( {{{a\left( {\xi_{x},\xi_{y}} \right)}{L_{g}\left( {x,y} \right)}} + {b\left( {\xi_{x},\xi_{y}} \right)}} \right)}}$wherein, ξ_(x),ξ_(y) are adjacent coordinates of the pixel (x,y), ω(x,y)is a local rectangular window at a distance of radius r from the pixel(x,y), |ω| is the number of pixels in the ω(x,y), a(ξ_(x),ξ_(y)) andb(ξ_(x),ξ_(y)) are respectively linear coefficients, which may berespectively computed according to the following two formulas:${a\left( {\xi_{x},\xi_{y}} \right)} = \frac{{\mu_{2}\left( {\xi_{x},\xi_{y}} \right)} - {\mu^{2}\left( {\xi_{x},\xi_{y}} \right)}}{{\sigma^{2}\left( {\xi_{x},\xi_{y}} \right)} + ɛ}$b(ξ_(x), ξ_(y)) = μ(ξ_(x), ξ_(y)) − a(ξ_(x), ξ_(y))μ(ξ_(x), ξ_(y))wherein, μ(ξ_(x),ξ_(y)) and σ²(ξ_(x),ξ_(y)) are respectively a mean anda variance of L_(g)(x,y) in ω(ξ_(x),ξ_(y)), μ₂(ξ_(x),ξ_(y)) is a mean ofL_(g) ²(x,y) in ω(ξ_(x),ξ_(y)), and ε is a regularization parameter. 10.An image enhancement system, comprising: an input brightness valueacquisition module, for acquiring an input brightness value of eachpixel of an input image; a brightness gain value computation module, forcomputing a log average value of the input brightness values; andprocessing the input image based on a Retinex image enhancementalgorithm, to obtain a first brightness gain value of each pixel; abrightness control module, for computing a brightness gain controlfactor, according to the log average value of the input brightnessvalues; and computing a second brightness gain value of each pixelaccording to the brightness gain control factor; and an imageenhancement module, for obtaining an output image by enhancing eachpixel of the input image according to the second brightness gain value.11. The image enhancement method of claim 8, wherein, computing theoutput of the guided filter according to the following formula:${H_{g}\left( {x,y} \right)} = {\frac{1}{\omega }{\sum\limits_{{({\xi_{x},\xi_{y}})}{{\epsilon\omega}{({x,y})}}}\left( {{{a\left( {\xi_{x},\xi_{y}} \right)}{L_{g}\left( {x,y} \right)}} + {b\left( {\xi_{x},\xi_{y}} \right)}} \right)}}$wherein, ξ_(x),ξ_(y) are adjacent coordinates of the pixel (x,y), ω(x,y)is a local rectangular window at a distance of radius r from the pixel(x,y), |ω| is the number of pixels in the ω(x,y), a(ξ_(x),ξ_(y)) andb(ξ_(x),ξ_(y)) are respectively linear coefficients, which may berespectively computed according to the following two formulas:${a\left( {\xi_{x},\xi_{y}} \right)} = \frac{{\mu_{2}\left( {\xi_{x},\xi_{y}} \right)} - {\mu^{2}\left( {\xi_{x},\xi_{y}} \right)}}{{\sigma^{2}\left( {\xi_{x},\xi_{y}} \right)} + ɛ}$b(ξ_(x), ξ_(y)) = μ(ξ_(x), ξ_(y)) − a(ξ_(x), ξ_(y))μ(ξ_(x), ξ_(y))wherein, μ(ξ_(x),ξ_(y)) and σ²(ξ_(x),ξ_(y)) are respectively a mean anda variance of L_(g)(x,y) in ω(ξ_(x),ξ_(y)), μ₂(ξ_(x),ξ_(y)) is a mean ofL_(g) ²(x,y) in ω(ξ_(x),ξ_(y)), and ε is a regularization parameter.